package it.unibo.imola.parser.visitor.entity;

public class Variable {

	private String name;
	private Object value;	

	public Variable(String name, Object value) {
		if(name == null)
			throw new IllegalArgumentException("name == null");
		if(value == null)
			throw new IllegalArgumentException("value == null");
		this.name = name;
		this.value = value;
	}
	
	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}
	
	/**
	 * @return the value
	 */
	public Object getValue() {
		return value;
	}
	/**
	 * @param value the value to set
	 */
	public void setValue(Object value) {
		if(value == null)
			throw new IllegalArgumentException("value == null");
		this.value = value;
	}
	
	@Override
	public String toString() {
		return "name="+name+", value="+value;
	}
}
